Cable compensation by zero-crossing compensation current and resistor

ABSTRACT

Methods, devices, and circuits are disclosed delivering a first level of output voltage to a rechargeable battery from a battery charger, the rechargeable battery is coupled to the battery charger by a charging cable. The methods, device, and circuits may further be disclosed applying, in response to an indication of an altered output voltage, a compensation current to one or more elements of the battery charger including a zero crossing (ZC) pin and a selected resistor, the selected resistor is defined by the charging cable coupling the battery charger to the rechargeable battery, and applying the compensation current to the ZC pin and the selected resistor causes an adjustment of the output voltage from the first level of output voltage to a second level of output voltage corresponding to the voltage drop from the impedance of the selected charging cable.

TECHNICAL FIELD

This disclosure relates to battery chargers, and more particular, totechniques and circuits that can provide for cable compensation inbattery chargers.

BACKGROUND

Some battery charger circuits may use power converters that receive apower input from a power source and convert the power input to a poweroutput that has a different (e.g., regulated) voltage or current levelthan the voltage or current level of the power input. The converteroutputs the power output to a filter for powering a component, acircuit, or other electrical device. Switch-based power converters mayuse half-bridge circuits and signal modulation techniques to regulatethe current or voltage level of the power output. In some examples,power converters may use additional feedback control circuits andtechniques (e.g., voltage sensing, current sensing, and the like) toimprove the accuracy and control of the voltage or current level of thepower output. These aforementioned techniques and circuits for improvingthe accuracy and control of the voltage or current of the power outputmay decrease overall efficiency of the power converter and/or increasethe physical size, complexity, and/or cost of the power converter.

SUMMARY

In general, techniques and circuits are described for enabling a powerconverter, such as a battery charger, to output a voltage level that canbe contained within a narrow (e.g., accurate) voltage-level tolerancewindow when using different charging cables, all without increasing thecost and/or bill of materials for the power converter. A powerconverter, such as an isolated AC-DC converter or a switched mode powersupply, may include one or more power switches, driver/control logic,and feedback control circuitry (e.g., current sensing or voltage sensingcircuitry).

One example is directed to a method of delivering a first level ofoutput voltage to a rechargeable battery from a battery charger, whereinthe rechargeable battery is coupled to the battery charger by a chargingcable, and applying, in response to an indication of an altered outputvoltage, a compensation current to one or more elements of the batterycharger including a zero crossing (ZC) pin and a selected resistor,wherein the selected resistor is defined based on the charging cablecoupling the battery charger to the rechargeable battery, whereinapplying the compensation current to the ZC pin and the selectedresistor causes an adjustment of the output voltage from the first levelof output voltage to a second level of output voltage corresponding tothe voltage drop from the impedance of the selected charging cable.

Another example is directed to a battery charging device comprising atransformer including a primary winding and an auxiliary winding, aprimary-side-regulation (PSR) controller, and an adjustable offsetvoltage (AOV) circuit. The PSR controller including a zero crossing (ZC)pin, a ZC sample module, wherein the ZC sample module samples a ZCvoltage at the ZC pin, a constant voltage control (CVC) module, whereinthe PSR controller delivers voltage to the rechargeable battery based onthe sampled ZC voltage at the ZC pin, and a compensation current controlmodule. The compensation current control module comprising asample-and-hold (S/H) module, wherein the S/H module samples and holdsan output voltage, a voltage to current generator, wherein the voltageto current generator is configured to generate a compensation current asa function of the sampled output voltage, and wherein the compensationcurrent control module is coupled to the ZC pin. The AOV circuitincluding a selected resistor, wherein the resistor is selected based ona charging cable, wherein the resistor is releasably coupled to the ZCpin and the auxiliary winding, and wherein an offset voltage at the ZCpin is generated by the compensation current and the resistorcorresponding to the voltage drop due to cable impedance of the selectedcharging cable.

Another example is directed to circuit comprising a transformerincluding a primary winding and an auxiliary winding, aprimary-side-regulation (PSR) controller, and an adjustable offsetvoltage (AOV) circuit. The PSR controller including a zero crossing (ZC)pin, a ZC sample module, wherein the ZC sample module samples a ZCvoltage at the ZC pin, a constant voltage control (CVC) module, whereinthe PSR controller delivers an output voltage to a rechargeable batterybased on the sampled ZC voltage at the ZC pin, and a compensationcurrent control module. The compensation current control modulecomprising a sample-and-hold (S/H) module, wherein the S/H modulesamples and holds the output voltage, a voltage to current generatormodule, wherein the voltage to current generator module is configured togenerate a compensation current as a function of the sampled outputvoltage, and wherein the compensation current control module is coupledto the ZC pin. The AOV circuit including a selected resistor, whereinthe resistor is selected based on a charging cable, wherein the resistoris releasably coupled to the ZC pin and the auxiliary winding, andwherein an offset voltage at the ZC pin is generated by the compensationcurrent and the resistor corresponding to the voltage drop due to cableimpedance of the selected charging cable.

The details of one or more examples are set forth in the accompanyingdrawings and the description below. Other features, objects, andadvantages of the invention will be apparent from the description anddrawings, and from the claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating a system for converting powerfrom a power source, in accordance with one or more aspects of thepresent disclosure.

FIG. 2 is a block diagram illustrating one example of a system shown inaccordance with an example of the present disclosure.

FIG. 3 is a block diagram illustrating an example of a power converterin accordance with an example of the present disclosure.

FIG. 4 is a conceptual diagram illustrating the sampling point ofvoltage on the auxiliary winding of the transformer, in accordance withone or more aspects of the present disclosure.

FIGS. 5A and 5B illustrate examples of the analog and digital approachto the voltage to current generator module shown in FIGS. 2-3.

FIG. 6 is a graphical illustration of an example of the relationshipbetween the compensation current and the sampled output voltage of thesystem shown in FIG. 2.

FIG. 7 is a flow chart illustrating a method of providing cablecompensation, in accordance with the examples of this disclosure.

FIGS. 8A & 8B are graphical illustrations depicting voltage waveformsbefore and after compensating for the charging cable impedance usingcurrent compensation control module described in FIGS. 2-3.

FIG. 9 is a table depicting the difference between the systems with andwithout cable compensation shown in FIGS. 8A & 8B.

FIG. 10 is a graphical illustration depicting a voltage waveform aftercompensation for the charging cable impedance using current compensationcontrol module and when the system has a fixed load shown FIG. 2.

DETAILED DESCRIPTION

In a switched-mode power supply (SMPS), the AC mains input is directlyrectified and then filtered to obtain a DC voltage. The resulting DCvoltage is then switched on and off at a high frequency by electronicswitching circuitry, thus producing an AC current that will pass througha high-frequency transformer or inductor. Switching occurs at a veryhigh frequency (typically 10 kHz-1 MHz), thereby enabling the use oftransformers and filter capacitors that are much smaller, lighter, andless expensive than those found in linear power supplies operating atmains frequency. After the inductor or transformer secondary, the highfrequency AC is rectified and filtered to produce the DC output voltage.If the SMPS uses an adequately insulated high-frequency transformer, theoutput will be electrically isolated from the mains; this feature isoften essential for safety. Switched-mode power supplies are usuallyregulated, and to keep the output voltage constant, the power supplyemploys a feedback controller that monitors current drawn by the load.The switching duty cycle increases as power output requirementsincrease.

In some applications, a switched-mode power supply or isolated AC-DCconverter (hereafter referred to as a “power converter” or “converter”)may receive a power (e.g., voltage, current, etc.) input and convert(e.g., by boosting) the power input to a power (e.g., voltage, current,etc.) output that has a voltage or current level that is different(e.g., regulated) than the voltage or current level of the power input,for instance, to provide the power output to a filter for powering aload (e.g., a device, or a rechargeable battery).

In either case, a power converter may have one or more switches (e.g.,MOS power switch transistors based switches, gallium nitride (GaN) basedswitches, or other types of switch devices) arranged in a power stageconfiguration that the power converter controls, according to one ormore modulation techniques, to change the current or voltage level ofthe power output by the power converter.

A power converter may include one or more gate drivers and control logicto control (e.g., turn-on and turn-off) the one or more switches of thepower stage using modulation techniques. Such modulation of the switchesof a power stage may operate according to pulse-density-modulation(PDM), pulse-width-modulation (PWM), pulse-frequency-modulation (PFM),or another suitable modulation technique. By controlling the switches ofa power stage using modulation techniques, a power converter canregulate the current or voltage level of the power being outputted bythe power converter.

Some power converters may use feedback circuits and techniques forperforming current sensing and/or voltage sensing to obtain informationabout a current or voltage level of a power output. The power convertermay use the information received using feedback circuits and techniquesto improve the accuracy of the power output. For example, the powerconverter may use the feedback information to contain the voltage orcurrent level of a power output within a particular tolerance orthreshold window for satisfying the voltage and/or current requirementsof a load. Some power converters may use voltage sensing as one exampleof feedback circuits and techniques to determine the real-time voltagelevel of the power being outputted to a load. If the power converterdetermines that the voltage level does not satisfy the voltagerequirements of the load, then the power converter may adjust or changehow the power converter controls the power switches in order to adjustor change the voltage level of the power output until the voltage levelof the power output is contained within the tolerance window andsatisfies the voltage level associated with the voltage requirements ofthe load.

In general, circuits and techniques of this disclosure may enable asystem including a power converter to output power with a voltage levelthat can compensate for voltage drop due to cable impedance of aselected charging cable, but also can be contained within a narrow(e.g., accurate) voltage-level tolerance window, all without increasingcost and/or decreasing efficiency of the power converter. A powerconverter, such as a flyback converter, may include one or more powerswitches, driver/control logic, and feedback control circuitry (e.g.,voltage sensing circuitry).

A flyback converter is used in both AC/DC and DC/DC conversion withgalvanic isolation between the input and any outputs. More precisely,the flyback converter is a boost converter with the inductor split toform a transformer, so that the voltage ratios are multiplied with anadditional advantage of isolation. When driving for example a plasmalamp or a voltage multiplier the rectifying diode of the boost converteris left out and the device is called a flyback transformer.

FIG. 1 is a block diagram illustrating system 1 (e.g. battery charger)for converting power from power source 2, in accordance with one or moreaspects of the present disclosure. FIG. 1 shows system 1 as having fourseparate and distinct components shown as power source 2, powerconverter 4, filter 6, and load 8, however system 1 may includeadditional or fewer components. For instance, power source 2, powerconverter 4, filter 6, and load 8 may be four individual components ormay represent a combination of one or more components that provide thefunctionality of system 1 as described herein.

System 1 includes power source 2 which provides electrical power tosystem 1. Numerous examples of power source 2 exist and may include, butare not limited to, power grids, generators, transformers, batteries,solar panels, windmills, regenerative braking systems, hydro-electricalor wind-powered generators, or any other form of devices that arecapable of providing electrical power to system 1.

System 1 includes power converter 4 which operates as a switched-modepower supply that converts one form of electrical power provided bypower source 2 into a different and usable form, of electrical power forpowering load 8. Power converter 4 may be a flyback converter thatoutputs power with a higher voltage level than the voltage level ofinput power received by the flyback converter. A flyback converter isused in both AC/DC and DC/DC conversion with galvanic isolation betweenthe input and any outputs. More precisely, the flyback converter is aboost converter with the inductor split to form a transformer, so thatthe voltage ratios are multiplied with an additional advantage ofisolation. Examples of power converter 4 may include battery chargers,microprocessor power supplies, and the like. Power converter 4 mayoperate as a DC-to-DC, DC-to-AC or AC-to-DC converter.

System 1 further includes filter 6 and load 8. Load 8 receives theelectrical power converted by power converter 4 after the power passesthrough filter 6. In some examples, load 8 uses the filtered electricalpower from power converter 4 and filter 6 to perform a function.Numerous examples of filter 6 exist and may include any suitableelectronic filter for filtering power for a load. Examples of filter 6include, but are not limited to, passive or active electronic filters,analog or digital filters, high-pass, low-pass, band pass, notch, orall-pass filters, resistor-capacitor filters, diode-capacitor filters,inductor-capacitor filters, resistor-inductor-capacitor filters, and thelike. Likewise, numerous examples of load 8 exist and may include, butare not limited to, computing devices and related components, such asmicroprocessors, electrical components, circuits, laptop computers,desktop computers, tablet computers, mobile phones, batteries (i.e.,rechargeable), speakers, lighting units,automotive/marine/aerospace/train related components, motors,transformers, or any other type of electrical device and/or circuitrythat receives a voltage or a current from a power converter.

Power source 2 may provide electrical power with a first voltage orcurrent level over link 10. Load 8 may receive electrical power that hasa second voltage or current level, converted by power converter 4, andfiltered through filter 6, over link 14. Links 10, 12, and 14 representany medium capable of conducting electrical power from one location toanother. Examples of links 10, 12, and 14 include, but are not limitedto, physical and/or wireless electrical transmission mediums such aselectrical wires, electrical traces, conductive gas tubes, twisted wirepairs, and the like. Each of links 10 and 12 provide electrical couplingbetween, respectively, power source 2 and power converter 4, and powerconverter 4 and filter 6. Link 14 provides electrical coupling betweenfilter 6 and load 8. In addition, link 14 provides a feedback loop orcircuit for carrying information to power converter 4 associated withthe characteristics of a filtered power output from filter 6.

In the example of system 1, electrical power delivered by power source 2can be converted by converter 4 to power that has a regulated voltageand/or current level that meets the voltage and/or current requirementsof load 8. For instance, power source 2 may output, and power converter4 may receive, power which has a first voltage level at link 10. Powerconverter 4 may convert the power which has the first voltage level topower which has a second voltage level that is required by load 8. Powerconverter 4 may output the power that has the second voltage level atlink 12. Filter 6 may receive the power from converter 4 and output thefiltered power that has the second voltage level at link 14.

Load 8 may receive the filtered power that has the second voltage levelat link 14. Load 8 may use the filtered power having the second voltagelevel to perform a function (e.g., charge a battery). Power converter 4may receive information over link 14 associated with the filtered powerthat has the second voltage level. For instance, feedback control (e.g.,voltage sensing or current sensing) circuitry of power converter 4 maydetect the voltage or current level of the filtered power output at link14 and driver/control logic of converter 4 may adjust the power outputat link 12 based on the detected voltage or current level to cause thefiltered power output to have a different voltage or current level thatfits within a voltage or current level tolerance window required by load8.

FIG. 2 is a block diagram illustrating one example of a system 1 inaccordance with an example of the present invention. A power source 2(rectified voltage at an HV input) is coupled to the primary windings ofa transformer through an input bulk capacitor. The voltage developed onthe secondary windings of the transformer is coupled to a filter 6(output capacitor 50 and secondary diode (not shown)). The voltage fromfilter 6 is presented as the output voltage generated by the powerconverter 4 at load 8, as described and shown in FIG. 1. Nodes 50 and 51of filter 6 represent connectors to which a charging cable 52 isconnected to charge a load 8 (rechargeable battery 54). The batteryvoltage is the resulting voltage developed across rechargeable battery54 by the output voltage from the secondary windings of the transformer.The operation of power converter 4 is controlled byprimary-side-regulation (PSR) controller 24, which is implemented as anIC (integrated circuit) chip.

In the example of FIG. 2, PSR controller 24 includes ZC sample module26, constant voltage control (CVC) module 28, zero crossing detector 40,comparator 41, SR (set-reset) flip-flop 42, transistor 44, and gain N.

ZC sample module 26 samples the ZC voltage when the secondary sidecurrent flowing from the secondary winding has discharged to zero. Upondetecting the secondary side current has discharged to zero ZC samplemodule 26 samples the voltage at a zero crossing pin (ZC pin 22 asdescribed below) and provides a signal or the zero crossing voltage toconstant voltage control (CVC) module 28. In some examples, ZC samplemodule 26 is a sample-and-hold (S/H) module.

CVC module 28 uses the zero crossing voltage to determine whether load 8has increased or decreased and adjusts its output voltage according tothe output voltage of power converter 4 to control the voltage deliveredto load 8, and keep the voltage within a tight tolerance. In oneexample, CVC module 28 is a proportional-integral (PI) controller. Inother examples, CVC module 28 is a proportional-integral-derivative(PID) controller.

Zero crossing detector 40 detects the zero crossing voltage at the zerocrossing pin (ZC pin 22 as described below) in order to provide a “set”signal to a SR flip-flop (e.g., SR flip-flop 42 as described below). Inother examples, zero crossing detector 40 could be replaced with anoscillator or the like.

Comparator 41 compares the signals from CVC module 28 and the currentsense pin (CS pin 20 as described below) and sends a “reset” signal toSR flip-flop 42 when the signal from CVC module 28 is equal to orgreater than the current sense pin.

SR flip-flop 42 provides a control signal to transistor 44 to turn ON orOFF depending on the signals from zero crossing detector 40 andcomparator 41.

Transistor 44 controls whether the primary winding of the transformer isconnected to ground. When transistor 44 is provided an ON signal from SRflip-flop 42, transistor 44 turns ON and connects the primary winding ofthe transformer and resistor R3 to ground. When transistor 44 isprovided an OFF signal from SR flip-flop 42, transistor 44 turns OFF anddisconnects the primary winding of the transformer and resistor R3 fromground. In some examples, transistor 44 is a MOSFET transistor.

Gain N provides the gain necessary to compare the signal or voltage ofCS pin 20 to the signal or voltage of CVC module 28.

The use of an IC chip may have a variety of benefits including smallform factor and low manufacturing cost. In the example of FIG. 2, PSRcontroller 24 is in an IC packaging with pins 18, 20, 22, which areschematically shown in FIG. 2 as nodes in power converter 4. Pin 18 isthe gate pin and provides a control signal to drive the gate of atransistor (MOSFET transistor 44). Pin 20 is the current sense (CS) pinand provides a signal indicative of the drain-to-source current flowingthrough the transistor when ON. Pin 22 is the zero crossing (ZC) pin andprovides the zero crossing voltage from the auxiliary winding of thetransformer which is sampled by ZC sample module 26.

In one example of FIG. 2, power converter 4 uses ZC sample module 26 ofPSR controller 24 to sample the voltage at ZC pin 22. In a standard PSRcontroller, the voltage at the ZC pin is the zero crossing voltage, andis sampled at the point just before the voltage on the auxiliary windingstarts to oscillate (as shown in FIG. 4). The oscillation is due to theexistence of the L-C circuit formed by the transformer inductance andthe MOSFET output capacitance COSS. When the current in the output diodedecreases to 0, the voltage on the auxiliary winding begins tooscillate. The zero crossing (ZC) voltage just before the oscillation ofthe auxiliary winding and when the secondary-side diode (not shown) isabout to be cut off may be very close to the output voltage across load8. The sampled ZC voltage by ZC sample module 26 passes through CVCmodule 28 (e.g., a PI controller or PID controller depending on therequirements). The output voltage or signal of CVC module 28 can provideinformation on the output voltage level of power converter 4 tocomparator 41. The output voltage or signal of CS pin 20 in combinationwith gain N can provide information to comparator 41 on the actualoutput voltage level of power converter 4 to load 8. Comparator 41compares the output voltage or signal of CVC module 28 to the outputvoltage or signal of CS pin 20 in combination with gain N to determinewhether to send a control signal (i.e., a “reset” signal) to SRflip-flop 42. Zero crossing detector 40 sends a control signal (i.e., a“set” signal) to SR flip-flop 42 after detection of a zero crossingvoltage at ZC pin 22. In another example, zero crossing detector 40 maybe replaced by an oscillator, or another type of clock. SR flip-flop 42sends a control signal to gate pin 18 which is coupled to transistor 44,and the control signal turns ON and OFF transistor 44, allowing PSRcontroller 24 to control power converter 4 and the amount of powerdelivered to filter 6 and load 8.

In the example of FIG. 2, power converter 4 compensates for the voltagedrop across the cable by introducing a variable compensation currentflowing into the zero crossing pin (ZC pin) 22. When the output voltageof system 1 is high, load 8 of system 1 is also high. When load 8 ishigh, load 8 requires a higher output current flowing through thecharging cable, and the impedance of the charging cable causes voltageloss when the output current is high. As a result, a compensationcurrent I_(cc) dependent on load 8, is provided to AOV circuit 38 toprovide an offset voltage to PSR controller 24 to compensate for thevoltage loss due to the impedance of the charging cable. A compensationcurrent I_(cc) may be introduced by compensation current control module30 to ZC pin 22 to compensate for the voltage drop due to cableimpedance of the charging cable. Compensation current I_(cc) and anexternally attached resistor, such as resistor R1 of AOV circuit 38,introduce a voltage offset to ZC pin 22 causing the sampled voltage atZC pin 22 to be higher. The offset voltage is representative of thevoltage drop introduced by the cable impedance of the charging cable.Moreover, the offset voltage allows PSR controller 24 of power converter4 to receive feedback that the output voltage at load 8 may be higher orlower than previously sampled by PSR controller 24. PSR controller 24may control power converter 4 to deliver additional power to filter 6and load 8 to compensate for the lower output power due to the impedanceof the charging cable and the increase and/or decrease in load 8. Inthis manner, the power provided by power converter 4 follows load 8because compensation current I_(cc) is dependent on load 8.

In one example implementation of PSR controller 24, the PSR controllerturns on the MOSFET, the transformer current i_(p) will increaselinearly from zero to i_(pk) as shown in Equation 1 below. During theturn-on period the energy is stored in the transformer. When the MOSFETturns off (t_(off)), the energy stored in transformer will deliver tothe output of the power converter through the output rectifier. Duringthis period, the output voltage V_(O) and diode forward voltage V_(F)will be reflected to the auxiliary winding N_(AUX), the voltage on theauxiliary winding N_(AUX) can be expressed by Equation 2. In someexamples, a sampling module is applied to sample the reflected voltage,such as ZC sample module 26 to sample the reflected voltage at ZC pin22. The correlated output voltage information can be obtained becausethe forward voltage of the output rectifier becomes a constant. Afterthat, the sampled voltage compares with a precise reference voltage todevelop a voltage loop for determining the on-time of the MOSFET andregulating an accurate constant output voltage.

$\begin{matrix}{i_{p\; k} = {\frac{V_{IN}}{L_{p}} \times t_{on}}} & (1) \\{V_{AUX} = {\frac{N_{AUX}}{N_{S}} \times \left( {V_{O} + V_{F}} \right)}} & (2)\end{matrix}$

In Equation 1, L_(P) is the primary winding inductance of thetransformer; V_(IN) is the input voltage of the transformer; t_(on) isthe on-time period of the MOSFET. In Equation 2, N_(AUX)/N_(S) is theturn ratio of the auxiliary winding and secondary output winding; V_(O)is the output voltage; and V_(F) is the forward voltage of the outputrectifier.

This sampling approach also duplicates a discharge time (t_(dis)), theoutput current I_(O) is related to secondary side current of thetransformer. It can be calculated by the signal i_(pk), t_(dis) asexpressed in Equation 3 below. The PSR controller uses this result todetermine the on-time of the MOSFET and regulate a constant outputcurrent. The current-sense resistor R_(SENSE) is used to adjust thevalue of the output current.

$\begin{matrix}{I_{O} = {{\frac{1}{2t_{S}}\left( {i_{p\; k} \times \frac{N_{P}}{N_{S}} \times t_{dis}} \right)} = {\frac{1}{2t_{S}}\left( {\frac{V_{CS}}{R_{SENSE}} \times \frac{N_{P}}{N_{S}} \times t_{dis}} \right)}}} & (3)\end{matrix}$

In Equation 3, t_(S) is the switching period of the PSR controller;N_(P)/N_(S) is the turn ratio of the primary winding and secondaryoutput winding; R_(SENSE) is the sense resistance for converting theswitching current of the transformer to a voltage V_(CS).

FIG. 3 is a block diagram illustrating an example of power converter 4in accordance with an example of the present invention. In the exampleof FIG. 3, the operation of system 1 is controlled by PSR controller 24,which is implemented as an IC (integrated circuit) chip as describedabove in FIGS. 1-2. In the example of FIG. 3, the PSR controller 24includes ZC sample module 26, constant voltage control (CVC) module 28,and compensation current control module 30.

Compensation current control module 30 provides a compensation currentto ZC pin 22 and resistor R1 based on the required output power at load8. Compensation current module 30 includes sample and hold (S/H) module32, maximum offset current limit module 34, and voltage to currentgenerator module 36.

S/H module 32 samples and holds the output voltage or signal andprovides a voltage or signal to voltage to current generator module 36.In some examples, S/H module 32 detects the output voltage at load 8from the output voltage or signal of CVC module 28. In other examples,S/H module 32 detects the output voltage at load 8 from the peak voltageat CS pin 20 indicative of the current flowing throwing the primarywinding of the transformer.

Maximum offset current limit module 34 limits the output voltage orsignal presented from S/H module 32 to voltage to current generatormodule 36. By limiting the output voltage or signal presented to voltageto current generator module 36, maximum offset current limit module 34prevents runaway conditions and ensures stability of system 1. In someexamples, maximum offset current limit module 34 is a filter (filter 31as shown in FIG. 2), such as a low pass filter. In other examples,maximum offset current limit module 34 filters the output voltage orsignal before S/H module 32 samples and holds the output voltage.

Voltage to current generator module 36 provides a compensation currentto ZC pin 22 and resistor R1 of AOV circuit 38 based on the limitedoutput voltage or signal from maximum offset current limit module 34. Inother examples, voltage to current generator module 36 provides acompensation current to ZC pin 22 and resistor R1 of AOV circuit 38based on the direct output voltage or signal from S/H module 32.

In the example of FIG. 3, PSR controller 24 is in an IC packaging withpins 18, 20, 22. The pins 18, 20, 22 are nodes in power converter 4.Gate pin 18 provides a control signal to drive the gate of a transistor,current sense (CS) pin 21 is used to sense the drain-to-source currentflowing through the transistor when ON, and zero crossing (ZC) pin 22 isreleasably coupled to adjustable offset voltage (AOV) circuit 38. Theoutput from CVC module 28 from PSR controller 24 is provided tocompensation current control module 30. The compensation current I_(cc)generated by voltage to current generator module 36 of currentcompensation control module 30 is provided to AOV circuit 38 via ZC pin22. AOV circuit 38 includes resistor R1 coupled to the auxiliary windingof the transformer and resistor R2, and R2 is in parallel with capacitorC2. Resistor R1 is adjusted based on a selected charging cable, such ascharging cable 52, as described and shown in FIG. 2, where chargingcable 52 is used to couple load 8 to filter 6 at nodes 50, 51.

In one example of FIG. 3, power converter 4 uses ZC sample module 26 ofPSR controller 24 to sample the voltage at ZC pin 22. In a standard PSRcontroller, the voltage at the ZC pin is the zero crossing voltage, andis sampled at the point just before the voltage on the auxiliary windingstarts to oscillate. The oscillation is due to the existence of the L-Ccircuit formed by the transformer inductance and the MOSFET outputcapacitance COSS. When the current in the output diode (not shown)decreases to 0, the voltage on the auxiliary winding begins tooscillate. The voltage just before the oscillation of the auxiliarywinding and when the secondary-side diode (not shown) is about to be cutoff is very close to output voltage across load 8. The sampled ZCvoltage is passed through CVC module 28 (e.g., a PI controller or PIDcontroller depending on the requirements). The output voltage of CVCmodule 28 provides information on the output level of the voltage atload 8.

In one example, the output voltage of CVC module 28 is then used tocontrol the amount of compensation current I_(cc) to be provided to AOVcircuit 38 by voltage to current generator module 36 via ZC pin 22. Theoutput voltage of CVC module 28 is sampled by S/H module 32 of cablecompensation module 30. The sampled output voltage of S/H module 32 fromthe output voltage of CVC module 28 is used by maximum offset currentlimit module 32 to limit the sampled output voltage provided to voltageto current generator module 36. The limited sample output voltageprovided to voltage to current generator module 36 is converted byeither analog or digital means, as shown in FIGS. 5A & 5B, intocompensation current I_(cc), and is provided to AOV circuit 38 bycompensation current control module 30 via ZC pin 22. The compensationcurrent I_(cc) generates an offset voltage between compensation currentI_(cc) and resistor R1 of AOV circuit 38 corresponding to the voltagedrop due to the cable impedance of the charging cable. The offsetvoltage is added to the ZC voltage located at ZC pin 22.

In another example, the output power across load 8 may be sampled by S/Hmodule 32 as the peak voltage of CS pin 20 and used to control theamount of compensation current I_(cc) to be provided to AOV circuit 38by voltage to current generator module 36 via ZC pin 22. The outputvoltage of CS Pin 20 is sampled by S/H module 32 of cable compensationmodule 30. The sampled output voltage of S/H module 32 is used bymaximum offset current limit module 32 to limit the sampled outputvoltage provided to voltage to current generator module 36. The limitedsample output voltage provided to voltage to current generator module 36is converted by either analog or digital means, as shown in FIGS. 5A &5B, into compensation current I_(cc), and is provided to AOV circuit 38by ZC pin 22. The compensation current I_(cc) generates an offsetvoltage between compensation current I_(cc) and resistor R1 of AOVcircuit 38 corresponding to the voltage drop due to the cable impedanceof the charging cable. The offset voltage is added to the ZC voltagelocated at ZC pin 22.

In the example of FIG. 3, the output power of power converter 4 may besampled every period of time. For example, the output power of powerconverter may be sampled every 2.5 milliseconds. In another example, theoutput power sampled of power converter 4 is the output voltage of CVCmodule 28. In other examples, the output voltage sampled of CVC module28 is a PI controller. The choice of sampling period places a limit onthe bandwidth of the system. By sampling the output power instead ofcontinuously monitoring the output voltage in real time, the stabilityof system 1 may be improved, as described with respect to FIG. 1.Introducing compensation current I_(cc) in real time could also causeundesirable overshoots at ZC pin 22 because system 1 reacts to theoffset voltage introduced by AOV circuit 38.

FIG. 4 is a conceptual diagram 100 illustrating sampling point 110 ofvoltage on the auxiliary winding 108 of the transformer. Gate 102represents the signal at gate pin 18 that transistor 44 of PSRcontroller 24, as described with respect to FIGS. 2-3, is either ON orOFF. Primary winding current 104 represents the current flowing throughthe primary winding of the transformer when gate 102 is either ON orOFF. Secondary winding current 106 represents the current flowingthrough the secondary winding of the transformer when gate 102 is eitherON or OFF. Auxiliary winding voltage 108 represents the voltage presentat the auxiliary winding of the transformer when gate 102 is either ONor OFF. Sampling point 110 represents the zero crossing voltage and theoutput voltage across load 8, as described with respect to FIGS. 1-3.

In the example of FIG. 4, a standard PSR controller, such as PSRcontroller 24 as described with respect to FIGS. 2-3, samples zerocrossing voltage 110 at the point just before auxiliary winding voltage108 starts to oscillate. The oscillation of auxiliary winding voltage108 is due to the existence of the L-C circuit formed by the transformerinductance and the MOSFET output capacitance COSS. When secondarywinding current 104 flowing through the output diode decreases to 0,auxiliary winding voltage 108 begins to oscillate, and auxiliary windingvoltage 108 at the moment before oscillation is zero crossing voltage(sampling point) 110, and represents the output voltage when thesecondary-side diode is about to be cut off.

FIGS. 5A & 5B illustrate two approaches for the voltage to currentgenerator shown in FIGS. 2-3. FIG. 5A is a schematic illustrating oneexample of analog approach 120 to the voltage to current generatormodule. In the example of FIG. 5A, voltage to current generator module36 uses a V to I converter, such as a transconductance amplifier togenerate compensation current 124. A person with skill in the art willappreciate the variety of methods to implement a transconductanceamplifier. FIG. 5B is a flow chart illustrating one example of digitalapproach 130 to the voltage to current generator module. In the exampleof FIG. 5B, voltage to current generator module 36 uses an analog todigital converter (ADC) to digitize sampled output voltage 122 and thebits supplied to a controller may select the magnitude of compensationcurrent 134 and generates compensation current 134. Sampled outputvoltage 122 can be from either the output voltage or signal of CVCmodule 28 or the peak output voltage or signal of CS pin 20 as describedwith respect to FIGS. 2-3.

FIG. 6 is a graphical illustration of an example of the relationshipbetween the compensation current and the sampled output voltage ofsystem 1 shown in FIG. 2.

Compensation current 242 comprises a current that is provided to ZC pin22 and resistor R1 by compensation current control module 30.Compensation current 242 and resistor R1 provide an offset voltage thatcorresponds to voltage drop due to the cable impedance of the selectedcharging cable.

Sampled output voltage 244 may be from the output voltage, the signal ofCVC module 28, or the peak output voltage and/or signal of CS pin 20. Insome examples, sampled output voltage 244 may have an output voltagebeyond the maximum or minimum load of system 1 as described in FIG. 1,and depicted as grey areas in FIG. 6.

Maximum load point 246 is the point at which maximum current offsetcurrent limit 34 as described with respect to FIG. 3, preventscompensation current 242 from increasing by limiting the output voltageor signal provided to voltage to current generator module 36 asdescribed with respect to FIG. 3. Maximum load point 246 represents themaximum compensation current provided to ZC pin 22 and resistor R1 bycompensation current control module 30, providing a cutoff to the amountof offset voltage added to ZC pin 22 and sampled by PSR controller 24.

In the example of FIG. 6, sampled output voltage 244 is an indication ofthe output load of the battery charger. Moreover, sampled output voltage244 is based on the sampled output voltage of the CVC module, which maybe a proportional-integral (PI) controller, aproportional-integral-derivative (PID) controller, or the like. Inanother example, sampled output voltage 244 is based on the peak sensevoltage at a current sense (CS) pin of PSR controller 24, as describedwith respect to FIGS. 2-3, indicative of the inductor current throughthe primary winding of the transformer. As the load and sampled outputvoltage 244 increase, as shown in FIG. 6, compensation current 242increases. The increase in compensation current 242 is necessary becausea higher output current flows through the cable impedance of thecharging cable when the load is high. The increase in compensationcurrent 242 is provided to ZC pin 22, as described with respect to FIGS.2-3, coupled to a resistor R1, and compensation current 242 with theresistor R1 provide an offset voltage to compensate for voltage loss dueto the cable impedance of charging cable 52 when load 8 is high. In theexample of FIG. 6, compensation current 242 is limited 248 to preventrunaway conditions and to ensure stability of system 1, as describedwith respect to FIG. 1. By providing offset voltage 246 to the system,compensation current 246 causes the ZC sampled voltage to be lower thanactual ZC voltage, providing PSR controller 24, as described withrespect to FIGS. 2-3, receives information that the output voltage atload 8 is lower than expected. With this information, PSR controller 24can deliver additional power to load 8 to compensate for the loweroutput voltage due to the cable impedance of the charging cable and thehigher load.

FIG. 7 is a flow chart illustrating a method 300 of providing cablecompensation, in accordance with the examples of this disclosure. Insome examples, a device, such as power converter 4 described above withrespect to FIGS. 1-3, may operate to perform method 300. The method willbe described with respect to the block diagram and circuit depicted inFIG. 3, but other circuits that include different or more circuitelements may operate to perform method 300. With respect to FIG. 3,power converter 4 is a battery charger and the load is a rechargeablebattery, as described with respect to FIG. 1.

In one example, at some moment, a circuit, such as power converter 4 asdescribed by FIG. 1, specifically a controller, such as PSR controller24 as described by FIG. 2, may deliver a first level of output voltageto a rechargeable battery from a battery charger, wherein therechargeable battery is coupled to the battery charger by a chargingcable (302). The circuit may also receive an indication to charge arechargeable battery—which in turn indicates an altered output voltagerequirement (increasing the output voltage requirement in the case ofconnecting a rechargeable battery and decreasing the output currentrequirement in the case of disconnecting a rechargeable battery). Thecontroller may then apply, in response to an indication of an alteredoutput voltage, a compensation current to one or more elements of thebattery charger including a zero crossing (ZC) pin and a selectedresistor, wherein the selected resistor is defined based on the chargingcable coupling the battery charger to the rechargeable battery, whereinapplying the compensation current to the ZC pin and the selectedresistor causes an adjustment of the output voltage from the first levelof output voltage to a second level of output voltage corresponding tothe voltage drop from the impedance of the selected charging cable(304).

In another example, the battery charger may apply power to aprimary-side-regulation (PSR) controller, wherein the PSR controllercontrols the voltage level of the power output supplied to a load. ThePSR controller controls the voltage level of the power output suppliedto the load by sampling a zero crossing (ZC) voltage at a ZC pin of thePSR controller to generate a sampled ZC output voltage signal,generating an output voltage of a constant voltage control (CVC) moduleas a function of the sampled ZC output voltage signal, sampling anoutput voltage of the battery charger to generate a sampled outputvoltage signal, generating a compensation current by a compensationcurrent control module at the ZC pin as a function of the sampled outputvoltage, wherein the compensation current and the resistor areconfigured to provide an offset voltage to the ZC pin to offset thevoltage drop due to the impedance of the selected charging cable, andcomparing the sampled output voltage signal to a sense voltage signalindicative of the inductor current on a primary winding of a transformerto control the battery charger and the charging of the rechargeablebattery.

FIGS. 8A & 8B are graphical illustrations comparing voltage waveformsbefore and after compensating for the charging cable impedance usingcurrent compensation control module described above with respect toFIGS. 2-3. These voltage waveforms represent the voltage across therechargeable battery depicted in FIG. 2, as explained in more detailbelow. These waveforms help in illustrating the relationships betweenthe elements of FIG. 2 and the change in the system when PSR controller24 applies a compensation current to ZC pin 22 and resistor R1

Beginning with window 400 of FIG. 8A, illustrates voltage waveform 402corresponding to the voltage applied to the rechargeable battery usingcurrent compensation module 30 and a 400 milliohm resistor for resistorR1. Window 400 also illustrates voltage waveform 404 corresponding tothe voltage applied to the rechargeable battery without currentcompensation module 30.

Window 410 of FIG. 8B illustrates voltage waveform 412 corresponding tothe voltage applied to the rechargeable battery using currentcompensation control module 30 and a 700 milliohm resistor for resistorR1. Window 410 also illustrates voltage waveform 414 corresponding tothe voltage applied to the rechargeable battery without currentcompensation control module 30 and no resistor R1.

FIG. 9 is a statistical illustration depicting the difference betweenthe systems with and without cable compensation shown in FIGS. 8A & 8B.Chart 420 depicts row 422, as shown as window 400 in FIG. 8A, with acharging cable impedance of 400 mΩ and row 424, as shown as window 410in FIG. 8B, with a charging cable impedance of 700 mΩ. Row 432 revealsthat the original system without cable compensation has a minimum outputvoltage of 6.21V and a maximum output voltage of 7V for a percentagespread of 11.9%. Row 432 also reveals that the module with cablecompensation has a minimum output voltage of 6.63V and a maximum outputvoltage of 6.75V for a percentage spread of 1.7%. Row 434 reveals thatthe original system without cable compensation has a minimum outputvoltage of 6.1V and a maximum output voltage of 7.4V for a percentagespread of 19.3%. Row 434 also reveals that the system with cablecompensation has a minimum output voltage of 6.42V and a maximum outputvoltage of 6.54V for a percentage spread of 1.9%. In general, theintroduction of an offset voltage by a compensation current at the ZCpin and a resistor to ground reduces the output voltage spread due tothe cable impedance of the selected charging cable.

FIG. 10 is a graphical illustration depicting a voltage waveform aftercompensation for the charging cable impedance using current compensationcontrol module 30 and when the system has a fixed load shown in FIG. 2.Window 500 illustrates voltage waveform 502 as the voltage acrossrechargeable battery 54 depicted in FIG. 2. Waveform 502 helpsillustrate the relationship between the elements of FIG. 2, and thestability of the system when PSR controller 24 applies a compensationcurrent to ZC pin 22 and resistor R1 and when the load is fixed. Ingeneral, the introduction of an offset voltage by a compensation currentat the ZC pin and a resistor to ground does not introduce anyinstability into system 1.

There several benefits to the disclosed system. In one example, thedisclosed system allows the user to adjust the desired output offset bychanging the value of resistor R1. In this case the user may be anoriginal equipment manufacturer (OEM) that purchases the circuit andconfigures to work with a particular cable. The cable impedance of theselected charging cable is not fixed, and the disclosed system providesthe flexibility to adjust resistor R1 allowing for a more universaldesign. Second, the compensation current (i.e., offset voltage) istracking the output voltage, which is based on the load, whereby alarger load has a larger output voltage, and a larger output voltage hasa larger compensation current (i.e., offset voltage). This tracking ofthe load improves the linearity of the compensation. Finally, no extraexternal bill-of-material cost is incurred in implementing the cablecompensation.

Any of the circuits, devices, and methods described above may beembodied in or performed in whole or in part by any of various types ofintegrated circuits, chip sets, and/or other devices, and/or as softwareexecuted by a computing device, for example. This may include processesperformed by, executed by, or embodied in one or more microcontrollers,central processing units (CPUs), processing cores, field-programmablegate arrays (FPGAs), programmable logic devices (PLDs), virtual devicesexecuted by one or more underlying computing devices, or any otherconfiguration of hardware and/or software.

Various examples of the invention have been described. These and otherexamples are within the scope of the following claims.

1. A method comprising: delivering a first level of output voltage to arechargeable battery from a battery charger, wherein the rechargeablebattery is coupled to the battery charger by a charging cable; andapplying, in response to an indication of an altered output voltage, acompensation current to one or more elements of the battery chargerincluding a zero crossing (ZC) pin and a selected resistor, wherein theselected resistor is defined based on the charging cable coupling thebattery charger to the rechargeable battery; wherein applying thecompensation current to the ZC pin and the selected resistor causes anadjustment of the output voltage from the first level of output voltageto a second level of output voltage corresponding to the voltage dropfrom the impedance of the selected charging cable.
 2. The method ofclaim 1, wherein the indication of the altered output voltage furthercomprises: operating a primary-side-regulation (PSR) controller, whereinthe PSR controller controls the power supplied to the rechargeablebattery, the method of controlling the power supplied to therechargeable battery comprising: sampling a zero crossing (ZC) voltageat a ZC pin of the PSR controller to generate a sampled ZC outputvoltage signal; generating an output voltage of a constant voltagecontrol (CVC) module as a function of the sampled ZC output voltagesignal; sampling an output voltage of the battery charger to generate asampled output voltage signal; generating a compensation current by acompensation current control module at the ZC pin as a function of thesampled output voltage, wherein the compensation current and theresistor are configured to provide an offset voltage to the ZC pin tooffset a voltage drop due to the impedance of the selected chargingcable; and comparing the sampled output voltage signal to a sensevoltage signal indicative of the inductor current on a primary windingof the transformer to control the battery charger and the charging ofthe rechargeable battery.
 3. The method of claim 1, wherein the selectedresistor is a first resistor coupled to a second resistor in parallelwith a capacitor.
 4. The method of claim 2, wherein the compensationcurrent control module further comprises limiting the sampled outputvoltage by a maximum current limit module, wherein limiting the sampledoutput voltage limits the compensation current.
 5. The method of claim2, wherein the sampled output voltage is an output voltage of the CVCmodule.
 6. The method of claim 2, wherein the sampled output voltage isa peak sense voltage at a current sense (CS) pin of the PSR controllerindicative of the inductor current through the primary winding of thetransformer.
 7. The method of claim 2, wherein the ZC sample module is asample-and-hold module that samples and holds the voltage detected atthe ZC pin.
 8. The method of claim 2, wherein the CVC module is aproportional-integral (PI) controller, and wherein the PI controller isconfigured to generate a PI controller output voltage as a function ofthe sampled ZC output voltage signal from the ZC sample module.
 9. Abattery charging device comprising: a transformer including a primarywinding and an auxiliary winding; a primary-side-regulation (PSR)controller including: a zero crossing (ZC) pin; a ZC sample module,wherein the ZC sample module samples a ZC voltage at the ZC pin; aconstant voltage control (CVC) module, wherein the PSR controllerdelivers an output voltage to a rechargeable battery based on thesampled ZC voltage at the ZC pin; and a compensation current controlmodule comprising: a sample-and-hold (S/H) module, wherein the S/Hmodule samples and holds an output voltage; a voltage to currentgenerator, wherein the voltage to current generator is configured togenerate a compensation current as a function of the sampled outputvoltage; and wherein the compensation current control module is coupledto the ZC pin; and an adjustable offset voltage circuit including: aselected resistor, wherein the resistor is selected based on a selectedcharging cable, wherein the resistor is releasably coupled to the ZC pinand the auxiliary winding, and wherein an offset voltage at the ZC pinis generated by the compensation current and the resistor correspondingto the voltage drop due to cable impedance of the selected chargingcable.
 10. The battery charger of claim 9, wherein the compensationcurrent control module further comprises a maximum current limit module,wherein the maximum current limit module limits the compensationcurrent.
 11. The battery charger of claim 9, wherein the sampled outputvoltage of the compensation current control module is an output voltageof the CVC module.
 12. The battery charger of claim 9, wherein thesampled output voltage of the compensation current control module is apeak sense voltage at a current sense (CS) pin of the PSR controllerindicative of the inductor current through the primary winding of thetransformer.
 13. The battery charger of claim 9, wherein the selectedresistor of the adjustable offset voltage circuit is a first resistorcoupled to a second resistor in parallel with a capacitor.
 14. Thebattery charger of claim 9, wherein the ZC sample module is asample-and-hold module that samples and holds the voltage at the zerocrossing pin.
 15. The battery charger of claim 9, wherein the CVC moduleis a proportional-integral (PI) controller, and wherein the PIcontroller is configured to generate a PI controller output voltage as afunction of the sampled ZC output voltage signal from the ZC samplemodule.
 16. The battery charger of claim 9, wherein the PSR controllerfurther comprising a zero crossing detector.
 17. The battery charger ofclaim 9, wherein the PSR controller further comprising an oscillator.18. A circuit comprising: a transformer including a primary winding andan auxiliary winding; a primary-side-regulation (PSR) controllerincluding: a zero crossing (ZC) pin; a ZC sample module, wherein the ZCsample module samples a ZC voltage at the ZC pin; a constant voltagecontrol (CVC) module, wherein the PSR controller delivers an outputvoltage to a rechargeable battery based on the sampled ZC voltage at theZC pin; and a compensation current control module comprising: asample-and-hold (S/H) module, wherein the S/H module samples and holdsthe output voltage; a voltage to current generator, wherein the voltageto current generator is configured to generate a compensation current asa function of the sampled output voltage; and wherein the compensationcurrent control module is coupled to the ZC pin; and an adjustableoffset voltage circuit including: a selected resistor, wherein theresistor is selected based on a selected charging cable, wherein theresistor is releasably coupled to the ZC pin and the auxiliary winding,and wherein an offset voltage at the ZC pin is generated by thecompensation current and the resistor corresponding to the voltage dropdue to cable impedance of the selected charging cable.
 19. The circuitof claim 18, wherein the PSR controller further comprising: a comparatorthat is configured to control a transistor and charge the recharegablebattery by the selected charging cable, wherein the comparator comprisesa first input node and a second input node, wherein the comparator isconfigured to generate a control signal at an output node of thecomparator by comparing an output voltage of the CVC module at the firstinput node of the comparator to a sense voltage signal indicative ofinductor current flowing through a primary winding of the transformer atthe second input node of the comparator, wherein the comparator isconfigured to generate at the output node of the comparator the controlsignal to control switching of a transistor and generation of the outputvoltage, and wherein the comparator develops a regulated output voltageto control the charging of the rechargeable battery.
 20. The circuit ofclaim 18, wherein the selected resistor of the adjustable offset voltagecircuit is a first resistor coupled to a second resistor in parallelwith a capacitor.